Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
ef734743
Commit
ef734743
authored
Mar 19, 2013
by
Nikias Bassen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cython: use uint64_t instead of int for Integer get_value and __repr__
parent
1f14105b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
plist.pxd
cython/plist.pxd
+4
-2
plist.pyx
cython/plist.pyx
+2
-2
No files found.
cython/plist.pxd
View file @
ef734743
from libc.stdint cimport *
cdef extern from "plist/plist.h":
cdef extern from "plist/plist.h":
ctypedef void *plist_t
ctypedef void *plist_t
ctypedef void *plist_dict_iter
ctypedef void *plist_dict_iter
...
@@ -17,7 +19,7 @@ cdef class Bool(Node):
...
@@ -17,7 +19,7 @@ cdef class Bool(Node):
cdef class Integer(Node):
cdef class Integer(Node):
cpdef set_value(self, object value)
cpdef set_value(self, object value)
cpdef
in
t get_value(self)
cpdef
uint64_
t get_value(self)
cdef class Key(Node):
cdef class Key(Node):
cpdef set_value(self, object value)
cpdef set_value(self, object value)
...
...
cython/plist.pyx
View file @
ef734743
...
@@ -180,7 +180,7 @@ cdef class Integer(Node):
...
@@ -180,7 +180,7 @@ cdef class Integer(Node):
self._c_node = plist_new_uint(int(value))
self._c_node = plist_new_uint(int(value))
def __repr__(self):
def __repr__(self):
cdef
in
t i = self.get_value()
cdef
uint64_
t i = self.get_value()
return '<Integer: %s>' % i
return '<Integer: %s>' % i
def __int__(self):
def __int__(self):
...
@@ -207,7 +207,7 @@ cdef class Integer(Node):
...
@@ -207,7 +207,7 @@ cdef class Integer(Node):
cpdef set_value(self, object value):
cpdef set_value(self, object value):
plist_set_uint_val(self._c_node, int(value))
plist_set_uint_val(self._c_node, int(value))
cpdef
in
t get_value(self):
cpdef
uint64_
t get_value(self):
cdef uint64_t value
cdef uint64_t value
plist_get_uint_val(self._c_node, &value)
plist_get_uint_val(self._c_node, &value)
return value
return value
...
...
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