File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -296,8 +296,8 @@ Inputs:
296296Returns:
297297- res: A cstring of the Builder's buffer
298298*/
299- unsafe_to_cstring :: proc (b: ^Builder) -> (res: cstring ) {
300- append (&b.buf, 0 )
299+ unsafe_to_cstring :: proc (b: ^Builder, loc := #caller_location ) -> (res: cstring ) {
300+ append (&b.buf, 0 , loc )
301301 pop (&b.buf)
302302 return cstring (raw_data (b.buf))
303303}
@@ -311,8 +311,8 @@ Returns:
311311- res: A cstring of the Builder's buffer upon success
312312- err: An optional allocator error if one occured, `nil` otherwise
313313*/
314- to_cstring :: proc (b: ^Builder) -> (res: cstring , err: mem.Allocator_Error) #optional_allocator_error {
315- n := append (&b.buf, 0 ) or_return
314+ to_cstring :: proc (b: ^Builder, loc := #caller_location ) -> (res: cstring , err: mem.Allocator_Error) #optional_allocator_error {
315+ n := append (&b.buf, 0 , loc ) or_return
316316 if n != 1 {
317317 return nil , .Out_Of_Memory
318318 }
@@ -518,9 +518,9 @@ Output:
518518 abc
519519
520520*/
521- write_string :: proc (b: ^Builder, s: string ) -> (n: int ) {
521+ write_string :: proc (b: ^Builder, s: string , loc := #caller_location ) -> (n: int ) {
522522 n0 := len (b.buf)
523- append (&b.buf, s)
523+ append (&b.buf, s, loc )
524524 n1 := len (b.buf)
525525 return n1-n0
526526}
You can’t perform that action at this time.
0 commit comments