Browse Source

added support with a single character macros like: " #define MACRO '2' " to use ASCI code.

pull/821/head
Gilad Levi 8 years ago
parent
commit
174ba93810
  1. 2
      src/Generator/Library.cs

2
src/Generator/Library.cs

@ -117,6 +117,8 @@ namespace CppSharp @@ -117,6 +117,8 @@ namespace CppSharp
static ulong ParseMacroExpression(string expression)
{
// TODO: Handle string expressions
if (expression.Length == 3 && expression[0] == '\'' && expression[2] == '\'') // '0' || 'A'
return expression[1]; // return the ASCI code of this character
long val;
return ParseToNumber(expression, out val) ? (ulong)val : 0;

Loading…
Cancel
Save