Skip to content

Commit 886ba6c

Browse files
committed
Fix xmlBufCreate() prototype
It takes a size argument.
1 parent aae50e9 commit 886ba6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/LibXML/Raw.rakumod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class xmlBuffer32 is repr(Opaque) is export {
188188

189189
#| New buffer structure, introduced in libxml 2.09.00, the actual structure internals are not public
190190
class xmlBuf is repr(Opaque) is export {
191-
our sub New(--> xmlBuf) is native($XML2) is symbol('xmlBufCreate') {*}
191+
our sub New(size_t --> xmlBuf) is native($XML2) is symbol('xmlBufCreate') {*}
192192
method Write(xmlCharP --> int32) is native($XML2) is symbol('xmlBufCat') {*}
193193
method WriteQuoted(xmlCharP --> int32) is native($XML2) is symbol('xmlBufWriteQuotedString') {*}
194194
method NodeDump(xmlDoc $doc, anyNode $cur, int32 $level, int32 $format --> int32) is native($XML2) is symbol('xmlBufNodeDump') { * }
@@ -208,7 +208,7 @@ class xmlBuf is repr(Opaque) is export {
208208
}
209209
method Str { self.Blob.decode }
210210
method Free is symbol('xmlBufFree') is native($XML2) { * }
211-
method new(--> xmlBuf:D) { New() }
211+
method new(UInt:D :$size = 0 --> xmlBuf:D) { New($size) }
212212
}
213213

214214
# type defs

0 commit comments

Comments
 (0)