|
4 | 4 | package gocroaring |
5 | 5 |
|
6 | 6 | /* |
7 | | -#cgo CFLAGS: -O3 -std=c99 |
| 7 | +#cgo CFLAGS: -O3 -std=c11 |
8 | 8 | #include "roaring.h" |
9 | 9 |
|
10 | 10 | */ |
@@ -434,24 +434,24 @@ func (ii *intIterator) Next() uint32 { |
434 | 434 | answer := ii.current |
435 | 435 | ii.has_next = bool(ii.pointertonext.has_value) |
436 | 436 | ii.current = uint32(ii.pointertonext.current_value) |
437 | | - C.roaring_advance_uint32_iterator(ii.pointertonext) |
| 437 | + C.roaring_uint32_iterator_advance(ii.pointertonext) |
438 | 438 | runtime.KeepAlive(ii) |
439 | 439 | return answer |
440 | 440 | } |
441 | 441 |
|
442 | 442 | func freeIntIterator(a *intIterator) { |
443 | | - C.roaring_free_uint32_iterator(a.pointertonext) |
| 443 | + C.roaring_uint32_iterator_free(a.pointertonext) |
444 | 444 | runtime.KeepAlive(a) |
445 | 445 | } |
446 | 446 |
|
447 | 447 | // This function may panic if the allocation failed. |
448 | 448 | func newIntIterator(a *Bitmap) *intIterator { |
449 | 449 | p := new(intIterator) |
450 | | - p.pointertonext = C.roaring_create_iterator(a.cpointer) |
| 450 | + p.pointertonext = C.roaring_iterator_create(a.cpointer) |
451 | 451 | p.has_next = bool(p.pointertonext.has_value) |
452 | 452 | p.current = uint32(p.pointertonext.current_value) |
453 | 453 | if p.has_next { |
454 | | - C.roaring_advance_uint32_iterator(p.pointertonext) |
| 454 | + C.roaring_uint32_iterator_advance(p.pointertonext) |
455 | 455 | } |
456 | 456 | runtime.KeepAlive(a) |
457 | 457 | if p.pointertonext == nil { |
@@ -534,7 +534,6 @@ func Read(b []byte) (*Bitmap, error) { |
534 | 534 | // this is immutable and attempting to mutate it will fail catastrophically |
535 | 535 | // It keeps a reference to the buffer internally to make sure it's alive for |
536 | 536 | // the complete lifetime of the view |
537 | | -// |
538 | 537 | func ReadFrozenView(b []byte) (*Bitmap, error) { |
539 | 538 | bchar := (*C.char)(unsafe.Pointer(&b[0])) |
540 | 539 | answer := &frozenBitmap{ |
|
0 commit comments