This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: Libs/MRML/vtkMRMLFiberBundleNode.cxx | |
=================================================================== | |
--- Libs/MRML/vtkMRMLFiberBundleNode.cxx (revision ) | |
+++ Libs/MRML/vtkMRMLFiberBundleNode.cxx (working copy) | |
@@ -52,7 +52,7 @@ vtkMRMLNode* vtkMRMLFiberBundleNode::CreateNodeInstance() | |
//---------------------------------------------------------------------------- | |
void vtkMRMLFiberBundleNode::PrintSelf(ostream& os, vtkIndent indent) | |
{ | |
- | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/home/inorton/bin/pywin | |
import comtypes, comtypes.client | |
from ctypes import * | |
from comtypes.automation import * | |
import sys | |
import numpy | |
# GetMassListFromScanNum(long FAR* pnScanNumber, LPCTSTR szFilter, | |
# long nIntensityCutoffType, long nIntensityCutoffValue, | |
# long nMaxNumberOfPeaks, BOOL bCentroidResult, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> using cindex; tu = tu_init("Index.h") | |
Ptr{Void} @0x00000000034586c0 | |
julia> cu = ccall( (:test_cu1, "../lib/libwrapcindex"), CXCursor, (Ptr{Void},), tu) | |
hash out: b540fa27 kind out: 300 | |
CXCursor(300,0,Ptr{Void} @0x0000000002c12b40,Ptr{Void} @0x0000000000000001,Ptr{Void} @0x00000000034586c0) | |
julia> ccall( (:test_cu2, "../lib/libwrapcindex"), Void, (CXCursor,), cu) | |
hash in: c8e83387 kind in: 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> require("test.jl") | |
Julia code | |
lfile PyPtr address: Ptr{Void} @0x000000000361d390 | |
Julia code | |
weakref address: Ptr{Void} @0x0000000003622f70 | |
Julia code: calling decref | |
C code: cb_wrapper | |
self: 0 | |
arg: 3622f70 | |
Julia code: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro c(ret_type, func, arg_types, lib) | |
args_in = Any[ symbol(string("a",x)) for x in 1:length(arg_types.args) ] | |
quote | |
$(esc(func))($(args_in...)) = ccall( ($(string(func)), $lib), $ret_type, $(arg_types), $(args_in...) ) | |
end | |
end | |
julia> @c Ptr{Void} wci_createCursorList () "../lib/libwrapcindex" | |
# methods for generic function wci_createCursorList | |
wci_createCursorList() at none:5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```julia | |
julia> ENV["JULIAHOME"] = "/cmn/git/julia" | |
"/cmn/git/julia" | |
julia> clang_includes = map(x->joinpath(ENV["JULIAHOME"], x), [ | |
"deps/llvm-3.2/build/Release/lib/clang/3.2/include", | |
"deps/llvm-3.2/include", | |
"deps/llvm-3.2/include", | |
"deps/llvm-3.2/build/include/", | |
"deps/llvm-3.2/include/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
recurs_sym_type(ex::Any) = | |
(ex==None || typeof(ex)==Symbol || length(ex.args)==1) ? eval(ex) : Expr(ex.head, ex.args[1], recurs_sym_type(ex.args[2])) | |
macro c(ret_type, func, arg_types, lib) | |
local _arg_types = Expr(:tuple, [recurs_sym_type(a) for a in arg_types.args]...) | |
local _ret_type = recurs_sym_type(ret_type) | |
local _args_in = Any[ symbol(string('a',x)) for x in 1:length(_arg_types.args) ] | |
local _lib = eval(lib) | |
quote | |
$(esc(func))($(_args_in...)) = ccall( ($(string(func)), $(Expr(:quote, _lib)) ), $_ret_type, $_arg_types, $(_args_in...) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> for i=1:cl.size | |
cu = cl[i] | |
is_virt = bool(cindex.CXXMethod_isVirtual(cu)) | |
is_stat = bool(cindex.CXXMethod_isStatic(cu)) | |
vtidx = "" | |
if(is_virt) vtidx = wrap_cpp.method_vt_index(cu) end | |
println(rpad(i,6), rpad(is_virt,6), rpad(vtidx,6), name(cu) ) | |
end | |
1 false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find, chomp, split, and return a list of matching files | |
[splitdir(splitext(chomp(x))[1])[2] for x in readlines(`sh -c "ls /usr/lib/libvtk*.so"`)] | |
julia> macro m1() | |
quote | |
function $(esc(:f1))(a1, a2) | |
ccall( fptr, thiscall, Void, (Ptr{Void},Ptr{Void}), a1, a2) | |
end |

OlderNewer