Hi I investigated the code produced by Cython, and I see 3 cases which should be handled :
* A pure python variable which has a value assigned (including None) * A pure python variable which has no value assigned * A C variable (we can't test if they are set of not) The first and second one seem relatively easy to implement it can reuse __pyx_string_tab. The code will call __Pyx_GetName on each element of the array, if it returns NULL, don't put the variable in the dictionary, else put the name and it's value in the dictionary. For the last one, it will probably need the C name, C type and Python name of each C variable, add the python name in the dictionary and wrap the C value into a Python object. However this will only provide read access to the globals. To offer read/write access, making a proxy dictionary is probably the most straightforward implementation (it can be rather inefficient though since we need to do an if/else to compare the value we want to set with every C globals). Do you think I'm on the right way ? Thanks Romain _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel