mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 17:49:25 +02:00
* added more highspeed string parsing functions
git-svn-id: trunk@14126 -
This commit is contained in:
parent
90d1dac1d3
commit
c1baa643db
@ -32,9 +32,6 @@ const
|
|||||||
|
|
||||||
{$i xml2.inc}
|
{$i xml2.inc}
|
||||||
|
|
||||||
operator := (const S: String): xmlCharPtr; inline;
|
|
||||||
//operator := (const C: AnsiChar): xmlCharPtr; inline;
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
procedure fpcxmlFree(mem: pointer); EXTDECL;
|
procedure fpcxmlFree(mem: pointer); EXTDECL;
|
||||||
@ -73,26 +70,6 @@ end;
|
|||||||
* macros from xmlversion.inc
|
* macros from xmlversion.inc
|
||||||
*)
|
*)
|
||||||
|
|
||||||
function BAD_CAST(str: pchar): xmlCharPtr;
|
|
||||||
begin
|
|
||||||
result := xmlCharPtr(str);
|
|
||||||
end;
|
|
||||||
|
|
||||||
function BAD_CAST(str: string): xmlCharPtr;
|
|
||||||
begin
|
|
||||||
result := xmlCharPtr(PChar(str));
|
|
||||||
end;
|
|
||||||
|
|
||||||
operator := (const S: String): xmlCharPtr; inline;
|
|
||||||
begin
|
|
||||||
Result := xmlCharPtr(PChar(S));
|
|
||||||
end;
|
|
||||||
|
|
||||||
{operator := (const C: AnsiChar): xmlCharPtr; inline;
|
|
||||||
begin
|
|
||||||
Result := xmlCharPtr(PChar(String(C)));
|
|
||||||
end;}
|
|
||||||
|
|
||||||
|
|
||||||
(*
|
(*
|
||||||
* macros from chvalid.inc
|
* macros from chvalid.inc
|
||||||
@ -218,7 +195,7 @@ end;
|
|||||||
|
|
||||||
function htmlElementAllowedHereDesc(parent: htmlElemDescPtr; elt: htmlElemDescPtr): cint;
|
function htmlElementAllowedHereDesc(parent: htmlElemDescPtr; elt: htmlElemDescPtr): cint;
|
||||||
begin
|
begin
|
||||||
Result := htmlElementAllowedHere(parent, BAD_CAST(elt^.name));
|
Result := htmlElementAllowedHere(parent, xmlCharPtr(elt^.name));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function htmlRequiredAttrs(elt: htmlElemDescPtr): ppchar;
|
function htmlRequiredAttrs(elt: htmlElemDescPtr): ppchar;
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
*)
|
*)
|
||||||
|
|
||||||
{$IFDEF POINTER}
|
{$IFDEF POINTER}
|
||||||
xmlCharPtr = ^xmlChar;
|
xmlCharPtr = PChar;
|
||||||
xmlCharPtrPtr = ^xmlCharPtr;
|
xmlCharPtrPtr = PPChar;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{$IFDEF TYPE}
|
{$IFDEF TYPE}
|
||||||
@ -21,7 +21,7 @@
|
|||||||
* It's unsigned allowing to pinpoint case where char * are assigned
|
* It's unsigned allowing to pinpoint case where char * are assigned
|
||||||
* to xmlChar * (possibly making serialization back impossible).
|
* to xmlChar * (possibly making serialization back impossible).
|
||||||
*)
|
*)
|
||||||
xmlChar = cchar;
|
xmlChar = Char;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{$IFDEF FUNCTION}
|
{$IFDEF FUNCTION}
|
||||||
@ -30,8 +30,7 @@
|
|||||||
*
|
*
|
||||||
* Macro to cast a string to an xmlChar * when one know its safe.
|
* Macro to cast a string to an xmlChar * when one know its safe.
|
||||||
*)
|
*)
|
||||||
function BAD_CAST(str: pchar): xmlCharPtr; inline;
|
//function BAD_CAST(str: string): xmlCharPtr; inline;
|
||||||
function BAD_CAST(str: string): xmlCharPtr; inline;
|
|
||||||
|
|
||||||
(*
|
(*
|
||||||
* xmlChar handling
|
* xmlChar handling
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user