Re: about the implement of the PyString_InternFromString

2006-05-04 Thread Fredrik Lundh
Kyo Guan wrote: > I have a question about the this API. > > PyObject * > PyString_InternFromString(const char *cp) > { > PyObject *s = PyString_FromString(cp); > if (s == NULL) > return NULL; > PyString_InternInPlace(&s); > return s; > } > > > Why it always try to call PyString_FromString first?

Re: about the implement of the PyString_InternFromString

2006-05-04 Thread Heiko Wundram
Am Donnerstag 04 Mai 2006 13:44 schrieb Kyo Guan: > Hi guys: > > I have a question about the this API. > > PyObject * > PyString_InternFromString(const char *cp) > { > PyObject *s = PyString_FromString(cp); > if (s == NULL) > return NULL; > PyString_InternInPla

about the implement of the PyString_InternFromString

2006-05-04 Thread Kyo Guan
Hi guys: I have a question about the this API. PyObject * PyString_InternFromString(const char *cp) { PyObject *s = PyString_FromString(cp); if (s == NULL) return NULL; PyString_InternInPlace(&s); return s; } Why it always try to call PyS

about the implement of the PyString_InternFromString

2006-05-04 Thread kyo guan
Hi : Hi guys: I have a question about the this API. PyObject * PyString_InternFromString(const char *cp) { PyObject *s = PyString_FromString(cp); if (s == NULL) return NULL; PyString_InternInPlace(&s); return s; } Why it always try to cal