repo.or.cz
/
chromium-blink-merge.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git]
/
third_party
/
cython
/
src
/
Cython
/
Debugger
/
Tests
/
codefile
blob
d5392e78e1ac752e4b7d452d70aaf436ce989dd1
1
cdef extern from "stdio.h":
2
int puts(char *s)
3
4
cdef extern:
5
void some_c_function()
6
7
import os
8
9
cdef int c_var = 12
10
python_var = 13
11
12
def spam(a=0):
13
cdef:
14
int b, c
15
16
b = c = d = 0
17
18
b = 1
19
c = 2
20
int(10)
21
puts("spam")
22
os.path.join("foo", "bar")
23
some_c_function()
24
25
cpdef eggs():
26
pass
27
28
cdef ham():
29
pass
30
31
cdef class SomeClass(object):
32
def spam(self):
33
pass
34
35
def outer():
36
cdef object a = "an object"
37
def inner():
38
b = 2
39
# access closed over variables
40
print a, b
41
return inner
42
43
44
outer()()
45
46
spam()
47
print "bye!"
48
49
def use_ham():
50
ham()