projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git]
/
src
/
third_party
/
cython
/
src
/
Cython
/
Debugger
/
Tests
/
codefile
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()