Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pybison
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
pybison
Commits
eb1d1da4
Commit
eb1d1da4
authored
Dec 11, 2011
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented hook_read (triggered after read() method is done).
parent
2ae8c15d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
src/pyrex/bison_.pyx
src/pyrex/bison_.pyx
+3
-0
No files found.
src/pyrex/bison_.pyx
View file @
eb1d1da4
...
@@ -128,6 +128,9 @@ cdef public void py_input(object parser, char *buf, int *result, int max_size):
...
@@ -128,6 +128,9 @@ cdef public void py_input(object parser, char *buf, int *result, int max_size):
except
KeyboardInterrupt
:
except
KeyboardInterrupt
:
raw
=
''
raw
=
''
if
hasattr
(
parser
,
'hook_read'
):
raw
=
parser
.
hook_read
(
raw
)
buflen
=
PyInt_AsLong
(
len
(
raw
))
buflen
=
PyInt_AsLong
(
len
(
raw
))
result
[
0
]
=
buflen
result
[
0
]
=
buflen
memcpy
(
buf
,
PyString_AsString
(
raw
),
buflen
)
memcpy
(
buf
,
PyString_AsString
(
raw
),
buflen
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment