mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 20:30:29 +02:00
* automatically convert (wide)chararrays to p(wide)chars for C varargs
git-svn-id: trunk@2951 -
This commit is contained in:
parent
4a6848269e
commit
b2cdab26af
@ -938,12 +938,10 @@ implementation
|
||||
hp.left:=ctypeconvnode.create_internal(hp.left,s32inttype);
|
||||
arraydef :
|
||||
begin
|
||||
if not(iscvarargs) and
|
||||
is_chararray(hp.left.resulttype.def) then
|
||||
if is_chararray(hp.left.resulttype.def) then
|
||||
hp.left:=ctypeconvnode.create_internal(hp.left,charpointertype)
|
||||
else
|
||||
if not(iscvarargs) and
|
||||
is_widechararray(hp.left.resulttype.def) then
|
||||
if is_widechararray(hp.left.resulttype.def) then
|
||||
hp.left:=ctypeconvnode.create_internal(hp.left,widecharpointertype)
|
||||
else
|
||||
CGMessagePos1(hp.left.fileinfo,type_e_wrong_type_in_array_constructor,hp.left.resulttype.def.typename);
|
||||
|
Loading…
Reference in New Issue
Block a user