Skip to content

Commit 7fac68e

Browse files
committed
FemtoCleaner fixes for 0.7
1 parent 3083902 commit 7fac68e

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

src/RobotOS.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
isdefined(Base, :__precompile__) && __precompile__()
1+
__precompile__()
2+
23

34
module RobotOS
45

@@ -16,7 +17,7 @@ function __init__()
1617

1718
#Fill in empty PyObjects
1819
if ! (dirname(@__FILE__) in _py_sys["path"])
19-
unshift!(_py_sys["path"], dirname(@__FILE__))
20+
pushfirst!(_py_sys["path"], dirname(@__FILE__))
2021
end
2122
copy!(_py_ros_callbacks, pyimport("ros_callbacks"))
2223

@@ -32,7 +33,7 @@ function __init__()
3233
end
3334

3435
#Compile the callback notify function, see callbacks.jl
35-
CB_NOTIFY_PTR[] = cfunction(_callback_notify, Cint, Tuple{Ptr{Void}})
36+
CB_NOTIFY_PTR[] = cfunction(_callback_notify, Cint, Tuple{Ptr{Cvoid}})
3637
end
3738

3839
include("debug.jl")

src/callbacks.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#This function will run in a new python thread created by rospy.
22
#No julia allocation allowed.
3-
function _callback_notify(handle::Ptr{Void})
4-
ccall(:uv_async_send, Cint, (Ptr{Void},), handle)
3+
function _callback_notify(handle::Ptr{Cvoid})
4+
ccall(:uv_async_send, Cint, (Ptr{Cvoid},), handle)
55
end
66

77
#The pointer to the compiled notify function. This can't be precompiled so it gets initialized in
88
#the module __init__ function.
9-
const CB_NOTIFY_PTR = Ref{Ptr{Void}}()
9+
const CB_NOTIFY_PTR = Ref{Ptr{Cvoid}}()
1010

1111
function _callback_async_loop(rosobj, cond)
1212
@debug("Spinning up callback loop...")

src/gentypes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ function _splittypestr(typestr::String)
609609
end
610610
#Valid ROS type string is all word chars split by a single forward slash, with
611611
#optional square brackets for array types
612-
_isrostype(s::String) = ismatch(r"^\w+/\w+(?:\[\d*\])?$", s)
612+
_isrostype(s::String) = occursin(r"^\w+/\w+(?:\[\d*\])?$", s)
613613

614614
#Sanitize a string by checking for and removing brackets if they are present
615615
#Return the sanitized type and the number inside the brackets if it is a fixed

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Compat.Test
1+
using Test
22
using PyCall
33
using RobotOS
44
RobotOS.debug(true)

0 commit comments

Comments
 (0)