http://qs321.pair.com?node_id=11135408


in reply to Re: Inline::C : passing parameters to functions, modifying by reference
in thread Inline::C : passing parameters to functions, modifying by reference

... BUT!

use strict; use warnings; use Inline C => "DATA"; xyz(); __DATA__ __C__ xyz(); __DATA__ __C__ #define __XX__ unsigned __XX__ int xyz(){ printf("hhaahah\n"); return 1; }
Undefined subroutine &main::xyz called at a.pl line 8.

removing any of the underscores in __XX__ fixes the problem.

whereas this does not have a problem:

use strict; use warnings; use Inline(C => <<'EOC'); #define __XX__ unsigned __XX__ int xyz(){ printf("hhaahah\n"); return 1; } EOC xyz();

I am neat-picking because in some of my usage, a 3rd party insists on typedef a __global__ and that messes up the whole inlining. But #define GLOBAL __global__ is a workaround.

bw, bliako