Code.pxd 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. from __future__ import absolute_import
  2. cimport cython
  3. cdef class UtilityCodeBase(object):
  4. cpdef format_code(self, code_string, replace_empty_lines=*)
  5. cdef class UtilityCode(UtilityCodeBase):
  6. cdef public object name
  7. cdef public object proto
  8. cdef public object impl
  9. cdef public object init
  10. cdef public object cleanup
  11. cdef public object proto_block
  12. cdef public object requires
  13. cdef public dict _cache
  14. cdef public list specialize_list
  15. cdef public object file
  16. cpdef none_or_sub(self, s, context)
  17. cdef class FunctionState:
  18. cdef public set names_taken
  19. cdef public object owner
  20. cdef public object scope
  21. cdef public object error_label
  22. cdef public size_t label_counter
  23. cdef public set labels_used
  24. cdef public object return_label
  25. cdef public object continue_label
  26. cdef public object break_label
  27. cdef public list yield_labels
  28. cdef public object return_from_error_cleanup_label # not used in __init__ ?
  29. cdef public object exc_vars
  30. cdef public object current_except
  31. cdef public bint in_try_finally
  32. cdef public bint can_trace
  33. cdef public bint gil_owned
  34. cdef public list temps_allocated
  35. cdef public dict temps_free
  36. cdef public dict temps_used_type
  37. cdef public size_t temp_counter
  38. cdef public list collect_temps_stack
  39. cdef public object closure_temps
  40. cdef public bint should_declare_error_indicator
  41. cdef public bint uses_error_indicator
  42. @cython.locals(n=size_t)
  43. cpdef new_label(self, name=*)
  44. cpdef tuple get_loop_labels(self)
  45. cpdef set_loop_labels(self, labels)
  46. cpdef tuple get_all_labels(self)
  47. cpdef set_all_labels(self, labels)
  48. cpdef start_collecting_temps(self)
  49. cpdef stop_collecting_temps(self)
  50. cpdef list temps_in_use(self)
  51. cdef class IntConst:
  52. cdef public object cname
  53. cdef public object value
  54. cdef public bint is_long
  55. cdef class PyObjectConst:
  56. cdef public object cname
  57. cdef public object type
  58. cdef class StringConst:
  59. cdef public object cname
  60. cdef public object text
  61. cdef public object escaped_value
  62. cdef public dict py_strings
  63. cdef public list py_versions
  64. @cython.locals(intern=bint, is_str=bint, is_unicode=bint)
  65. cpdef get_py_string_const(self, encoding, identifier=*, is_str=*, py3str_cstring=*)
  66. ## cdef class PyStringConst:
  67. ## cdef public object cname
  68. ## cdef public object encoding
  69. ## cdef public bint is_str
  70. ## cdef public bint is_unicode
  71. ## cdef public bint intern
  72. #class GlobalState(object):
  73. #def funccontext_property(name):
  74. #class CCodeWriter(object):
  75. cdef class PyrexCodeWriter:
  76. cdef public object f
  77. cdef public Py_ssize_t level