[Vala] bug in vapi
- From: pancake <pancake youterm com>
- To: vala-list gnome org
- Subject: [Vala] bug in vapi
- Date: Tue, 27 Jan 2009 02:03:27 +0100
I noticed that property support is not affected by the cprefix
CCode attribute.
Here's an example:
[Compact]
[CCode (cname="struct r_asm_t", free_function="r_asm_free", cprefix="r_asm_")]
public class State {
public unowned string buf_asm;
public unowned string buf_hex;
public State();
public bool arch { set; };
public bool set_arch(Arch arch);
public bool set_bits(int bits);
public bool set_syntax(Syntax syntax);
public bool set_pc(uint64 addr);
public bool set_big_endian(bool big);
public bool disasm(uint8 *buf, int length);
}
If we call to set_arch(Asm.Arch.X86); the C code is:
r_asm_set_arch(R_ASM_ARCH_X86);
but if we do it using the 'arch' property:
arch = Asm.Arch.X86;
the code doesnt follows the cprefix directive and translates it to:
r_asm_state_set_arch(R_ASM_ARCH_X86);
which is obviously wrong :)
PD: This code is from radare libr project (fmi: radare.org)
--pancake
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]