-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C error: function pointer expected #22256
Comments
The problem is the name clashing. See: Array_u8 string_bytes = firebird__marshal_array_u8(string_bytes(s)); V |
@spytheman @medvednikov what do you guys suggest for this cases? |
Is there a workaround I can use in the meantime? Development is stalled because of this error |
The error is here fn (mut p WireProtocol) pack_string(s string) {
string_bytes := marshal_array_u8(s.bytes())
p.buf = arrays.append(p.buf, string_bytes)
} Just change |
@felipensp would adding a default name mangling for user defined variables, functions, types, etc. and a different one for all internal auto generated types be a viable solution? ie. prefixing all user variables and functions with |
Yeah, I already thought about this approach. What do you think @medvednikov ? |
Why not postfix userland function names with a hash? |
is there a benefit to a hash over just an int counter like is used for anonymous... I believe structs? |
Related to issue #17831 |
Hashes are more unique, but now I think an int counter is just fine. |
Describe the bug
C error: function pointer expected
Reproduction Steps
Expected Behavior
No C error
Current Behavior
C error
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.7 263ba23
Environment details (OS name and version, etc.)
V full version: V 0.4.7 ace4e93.263ba23
OS: linux, Linux version 5.14.0-427.33.1.el9_4.x86_64 (mockbuild@pp-el9) (gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3), GNU ld version 2.35.2-43.el9) #1 SMP PREEMPT_DYNAMIC Thu Aug 29 12:00:49 CEST 2024
Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
getwd: /home/einar/Documents/projects/vlang/active/firebird
vexe: /home/einar/.local/lib64/v/v
vexe mtime: 2024-09-18 16:47:41
vroot: OK, value: /home/einar/.local/lib64/v
VMODULES: OK, value: /home/einar/.vmodules
VTMP: OK, value: /tmp/v_1001
Git version: git version 2.43.5
Git vroot status: weekly.2024.37-25-g263ba232
.git/config present: true
CC version: cc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)
thirdparty/tcc status: thirdparty-linux-amd64 0134e9b9
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: