projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a88130e
)
CEP 516 in pure mode
author
Robert Bradshaw
<robertwb@math.washington.edu>
Thu, 26 Mar 2009 04:56:52 +0000
(21:56 -0700)
committer
Robert Bradshaw
<robertwb@math.washington.edu>
Thu, 26 Mar 2009 04:56:52 +0000
(21:56 -0700)
Cython/Shadow.py
patch
|
blob
|
history
diff --git
a/Cython/Shadow.py
b/Cython/Shadow.py
index c6c1a77741610334e6a0a64fed1beffd00dd7784..1fe9dc19a540b8539d439cc5d87b5d6305245ce8 100644
(file)
--- a/
Cython/Shadow.py
+++ b/
Cython/Shadow.py
@@
-6,6
+6,19
@@
def empty_decorator(x):
def locals(**arg_types):
return empty_decorator
+# Special functions
+
+def cdiv(a, b):
+ q = a / b
+ if q < 0:
+ q += 1
+
+def cmod(a, b):
+ r = a % b
+ if (a*b) < 0:
+ r -= b
+ return r
+
# Emulated language constructs