swig help

General FreeBASIC programming questions.
Merick
Posts: 1038
Joined: May 28, 2007 1:52

swig help

Postby Merick » Nov 28, 2007 2:00

In a file that I just ran through swig, it converted this:

Code: Select all

#define K_BS     '\b'
#define K_CR     '\r'


into this:

Code: Select all

#define K_BS asc("")
#define K_CR asc("
")


should it be this instead?

Code: Select all

#define K_BS     !"\b"
#define K_CR     !"\r"
cha0s
Site Admin
Posts: 5317
Joined: May 27, 2005 6:42
Location: Illinois
Contact:

Postby cha0s » Nov 28, 2007 5:42

Yeah that's definitley wrong. SWIG ain't perfect...
Merick
Posts: 1038
Joined: May 28, 2007 1:52

Postby Merick » Nov 28, 2007 12:04

Has anyone tried updating the FB version of swig lately?
VirusScanner
Posts: 775
Joined: Jul 01, 2005 18:45

Postby VirusScanner » Nov 30, 2007 0:26

In C, it's defining character constants, not strings. This is correct:

Code: Select all

#define K_BS     asc(!"\b")
#define K_CR     asc(!"\r")

Return to “General”

Who is online

Users browsing this forum: No registered users and 4 guests