diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1996-03-05 16:56:24 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1996-03-05 16:56:24 (GMT) |
commit | 911ad6b0670cf990c486a701d3f85027ac669fb7 (patch) | |
tree | 5f233ad34ce35071442030562b66b6e394a42d12 /Mac/Python | |
parent | 6648fb749b64bea42a3868cf98f71494e898d61e (diff) | |
download | cpython-911ad6b0670cf990c486a701d3f85027ac669fb7.zip cpython-911ad6b0670cf990c486a701d3f85027ac669fb7.tar.gz cpython-911ad6b0670cf990c486a701d3f85027ac669fb7.tar.bz2 |
Added code to make fsspecs work for gusi-python
Diffstat (limited to 'Mac/Python')
-rw-r--r-- | Mac/Python/macglue.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c index 23415eb..dd4499e 100644 --- a/Mac/Python/macglue.c +++ b/Mac/Python/macglue.c @@ -49,6 +49,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef __MWERKS__ #include <SIOUX.h> #endif +#ifdef USE_GUSI +#include <TFileSpec.h> /* For Path2FSSpec */ +#endif #ifndef HAVE_UNIVERSAL_HEADERS #define GetResourceSizeOnDisk(x) SizeResource(x) @@ -654,8 +657,21 @@ PyMac_GetFSSpec(PyObject *v, FSSpec *fs) /* It's a pathname */ if( !PyArg_Parse(v, "O&", PyMac_GetStr255, &path) ) return 0; +#ifdef USE_GUSI + { + FSSpec curdirfss; + + if ( Path2FSSpec(":x", &curdirfss) == 0 ) { + refnum = curdirfss.vRefNum; + parid = curdirfss.parID; + } else { + return 0; + } + } +#else refnum = 0; /* XXXX Should get CurWD here... */ parid = 0; +#endif } else { if( !PyArg_Parse(v, "(hlO&); FSSpec should be fullpath or (vrefnum,dirid,path)", &refnum, &parid, PyMac_GetStr255, &path)) { |