Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1213)

Unified Diff: third_party/cython/src/Cython/Debugger/Tests/codefile

Issue 385073004: Adding cython v0.20.2 in third-party. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reference cython dev list thread. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/cython/src/Cython/Debugger/Tests/codefile
diff --git a/third_party/cython/src/Cython/Debugger/Tests/codefile b/third_party/cython/src/Cython/Debugger/Tests/codefile
new file mode 100644
index 0000000000000000000000000000000000000000..d5392e78e1ac752e4b7d452d70aaf436ce989dd1
--- /dev/null
+++ b/third_party/cython/src/Cython/Debugger/Tests/codefile
@@ -0,0 +1,50 @@
+cdef extern from "stdio.h":
+ int puts(char *s)
+
+cdef extern:
+ void some_c_function()
+
+import os
+
+cdef int c_var = 12
+python_var = 13
+
+def spam(a=0):
+ cdef:
+ int b, c
+
+ b = c = d = 0
+
+ b = 1
+ c = 2
+ int(10)
+ puts("spam")
+ os.path.join("foo", "bar")
+ some_c_function()
+
+cpdef eggs():
+ pass
+
+cdef ham():
+ pass
+
+cdef class SomeClass(object):
+ def spam(self):
+ pass
+
+def outer():
+ cdef object a = "an object"
+ def inner():
+ b = 2
+ # access closed over variables
+ print a, b
+ return inner
+
+
+outer()()
+
+spam()
+print "bye!"
+
+def use_ham():
+ ham()

Powered by Google App Engine
This is Rietveld 408576698