rust-cpython: move py_shared_state to PySharedRefCell object
The goal of this series is to encapsulate more "py_shared" thingy and
reduce the size of the macro, which is hard to debug.
Since py_shared_state manages the borrowing state of the object owned by
PySharedRefCell, this change makes more sense. If a PyObject has more than
one data to be leaked into Python world, each PySharedState should incref
the parent PyObject, and keep track of the corresponding borrowing state.
#!/bin/rc
# 9mail - Mercurial email wrapper for upas/marshal
fn usage {
echo >[1=2] usage: mercurial/9mail -f from to [cc]
exit usage
}
from=()
cc=()
to=()
switch($1){
case -f
from=$2
case *
usage
}
to=($3)
if(~ $#* 4)
cc=(-C $4)
upasname=$from
upas/marshal $cc $to