Skip to content

Commit

Permalink
ensure we don't clip 64-bit cython values
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 25, 2025
1 parent 131799b commit 2c0590b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion xpra/platform/darwin/gdk3_bindings.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ cdef NSView *get_nsview(pywindow):
cdef NSView *nsview = gdk_quartz_window_get_nsview(gdkwindow)
return nsview

def get_nsview_ptr(pywindow) -> int:
def get_nsview_ptr(pywindow) -> long:
cdef NSView *nsview = get_nsview(pywindow)
return <uintptr_t> nsview

Expand Down
2 changes: 1 addition & 1 deletion xpra/platform/posix/proc_libproc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cdef extern from "libproc2/pids.h":
int procps_pids_unref(pids_info **info)
pids_fetch *procps_pids_select(pids_info *info, unsigned*pids, int pidcount, int select_type)

def get_parent_pid(unsigned int pid) -> int:
def get_parent_pid(unsigned int pid) -> long:
cdef pids_info *handle = NULL
cdef pids_item selector = PIDS_ID_PPID
if procps_pids_new(&handle, &selector, 1) != 0:
Expand Down
2 changes: 1 addition & 1 deletion xpra/platform/posix/proc_procps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cdef extern from "proc/readproc.h":
proc_t* readproc(PROCTAB *PT, proc_t *p)
void closeproc(PROCTAB* PT)

def get_parent_pid(int pid) -> int:
def get_parent_pid(int pid) -> long:
cdef proc_t proc_info
memset(&proc_info, 0, sizeof(proc_t))
cdef PROCTAB *pt_ptr = openproc(PROC_FILLSTATUS | PROC_PID, &pid)
Expand Down

0 comments on commit 2c0590b

Please sign in to comment.