Menu

#106 HSQAPI and typeof (compile error)

None
closed
nobody
None
9
2021-04-22
2021-04-22
Patrix9999
No

Hi!

Recently i've published a MR to this repo which added missing functions to HSQAPI structure of function pointers.

However, i haven't tested the code under Linux platform, and here we are..
GCC/G++ defines custom function called 'typeof' and it's name collides with one of the function pointer.

This results in compile error, the only way to fix it (that i know of) is to rename this function pointer.
But what new name of this function would be appropriate?

_typeof?
typeof_?
_typeof_?
typeOf?
other?

I can publish a new MR with a fix, but i do need some advice about this problem.

Discussion

  • Patrix9999

    Patrix9999 - 2021-04-22

    Propably the best name for this function would be: type_of.
    It kinda breaks the naming rule, but it's the most elegant equivalent that i thought of.

     
  • Wizzard

    Wizzard - 2021-04-22

    type_of should be fine

     
  • Wizzard

    Wizzard - 2021-04-22
    • status: open --> closed
    • Group: -->
     

Log in to post a comment.