[geany/geany] 80ad5c: Merge branch 'aeberspaecher/cython/ndarray-fix'
Colomban Wendling
git-noreply at xxxxx
Mon Jul 15 13:48:00 UTC 2013
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Mon, 15 Jul 2013 13:48:00 UTC
Commit: 80ad5c145900ac29b9fefdab5b84345b2e26268c
https://github.com/geany/geany/commit/80ad5c145900ac29b9fefdab5b84345b2e26268c
Log Message:
-----------
Merge branch 'aeberspaecher/cython/ndarray-fix'
Modified Paths:
--------------
tagmanager/ctags/python.c
tests/ctags/Makefile.am
tests/ctags/cython_sample2.pyx
tests/ctags/cython_sample2.pyx.tags
Modified: tagmanager/ctags/python.c
8 files changed, 7 insertions(+), 1 deletions(-)
===================================================================
@@ -576,7 +576,13 @@ static const char *skipTypeDecl (const char *cp, boolean *is_class)
}
/* limit so that we don't pick off "int item=obj()" */
while (*ptr && loopCount++ < 2) {
- while (*ptr && *ptr != '=' && *ptr != '(' && !isspace(*ptr)) ptr++;
+ while (*ptr && *ptr != '=' && *ptr != '(' && !isspace(*ptr)) {
+ /* skip over e.g. 'cpdef numpy.ndarray[dtype=double, ndim=1]' */
+ if(*ptr == '[') {
+ while(*ptr && *ptr != ']') ptr++;
+ }
+ ptr++;
+ }
if (!*ptr || *ptr == '=') return NULL;
if (*ptr == '(') {
return lastStart; /* if we stopped on a '(' we are done */
Modified: tests/ctags/Makefile.am
1 files changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -113,6 +113,7 @@ test_sources = \
countall.sql \
cpp_destructor.cpp \
cython_sample.pyx \
+ cython_sample2.pyx \
cxx11enum.cpp \
db-trig.sql \
debian_432872.f90 \
Modified: tests/ctags/cython_sample2.pyx
11 files changed, 11 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,11 @@
+# -*- cython-mode -*-
+# test code for cython functionality with complex datatypes
+
+import numpy as np
+cimport numpy as np
+
+cpdef np.ndarray[dtype=double, ndim=1] my_fun(np.ndarray[dtype=double, ndim=1] x):
+ cdef np.ndarray[dtype=double, ndim=1, mode="c"] res
+
+ res = 2*x
+ return res
Modified: tests/ctags/cython_sample2.pyx.tags
3 files changed, 3 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,3 @@
+# format=tagmanager
+my_fun�16�(np.ndarray[dtype=double, ndim=1] x)�0
+np�256�0
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list