Kaydet (Commit) f45b53b1 authored tarafından Guido van Rossum's avatar Guido van Rossum

replace %#s with portable solution

üst 4cbb0e3a
...@@ -191,7 +191,7 @@ mfsa_dealloc(self) ...@@ -191,7 +191,7 @@ mfsa_dealloc(self)
DEL(self); DEL(self);
} }
static typeobject Mfsatype = { statichere typeobject Mfsatype = {
OB_HEAD_INIT(&Typetype) OB_HEAD_INIT(&Typetype)
0, /*ob_size*/ 0, /*ob_size*/
"Alias", /*tp_name*/ "Alias", /*tp_name*/
...@@ -394,9 +394,10 @@ mfss_repr(self) ...@@ -394,9 +394,10 @@ mfss_repr(self)
{ {
char buf[512]; char buf[512];
/* XXXX Does %#s work for all compilers? */ sprintf(buf, "FSSpec((%d, %d, '%.*s'))",
sprintf(buf, "FSSpec((%d, %d, '%#s'))", self->fsspec.vRefNum, self->fsspec.vRefNum,
self->fsspec.parID, self->fsspec.name); self->fsspec.parID,
self->fsspec.name[0], self->fsspec.name+1);
return newstringobject(buf); return newstringobject(buf);
} }
...@@ -420,7 +421,7 @@ mfss_compare(v, w) ...@@ -420,7 +421,7 @@ mfss_compare(v, w)
return res; return res;
} }
static typeobject Mfsstype = { statichere typeobject Mfsstype = {
OB_HEAD_INIT(&Typetype) OB_HEAD_INIT(&Typetype)
0, /*ob_size*/ 0, /*ob_size*/
"FSSpec", /*tp_name*/ "FSSpec", /*tp_name*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment