[Python-checkins] python/dist/src/Python ceval.c,2.327,2.328

Jeremy Hylton jeremy@alum.mit.edu
Mon, 19 Aug 2002 16:26:54 -0400


	/* Inline the PyDict_GetItem() calls */
	PyDictObject *d;
	d = (PyDictObject *)(f->f_globals);
	x = d->ma_lookup(d, w, hash)->me_value;
	if (x != NULL) {
		Py_INCREF(x);
		PUSH(x);
		continue;
	}
 
How about a macro here?

#define PyDict_STRING_LOOKUP(D, S, HASH) \
        ((PyDictObject *)D)->ma_lookup((D), (S), (HASH))->me_value

Jeremy