Skip to content

Commit

Permalink
one last fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewAnnex committed Apr 22, 2020
1 parent ba6395b commit b4fd314
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spiceypy/utils/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import functools
from ctypes import c_int, c_double, c_char_p, POINTER, CFUNCTYPE, byref
from .support_types import SpiceCell, to_python_string
from .support_types import SpiceCell, SpiceCellPointer, to_python_string
from typing import Callable, Union

UDFUNC = CFUNCTYPE(None, c_double, POINTER(c_double))
Expand Down Expand Up @@ -126,7 +126,9 @@ def wrapping_udrefn(
return UDREFN(wrapping_udrefn)


def SpiceUDREPI(f: Callable[[SpiceCell, str, str], None]) -> UDREPI:
def SpiceUDREPI(
f: Callable[[Union[SpiceCell, SpiceCellPointer], str, str], None]
) -> UDREPI:
"""
Decorator for wrapping python functions in spice udfrepi callback type
Expand All @@ -136,7 +138,7 @@ def SpiceUDREPI(f: Callable[[SpiceCell, str, str], None]) -> UDREPI:

@functools.wraps(f)
def wrapping_udrepi(
cnfine: POINTER(SpiceCell), srcpre: bytes, srcsurf: bytes
cnfine: Union[SpiceCell, SpiceCellPointer], srcpre: bytes, srcsurf: bytes
) -> None:
f(cnfine, to_python_string(srcpre), to_python_string(srcsurf))

Expand Down

0 comments on commit b4fd314

Please sign in to comment.