Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-12258

The C-CBL code snippet for FLArray_Count is missing an arument

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • Mobile
    • None
    • 0

    Description

      The documentation:

      https://docs.couchbase.com/couchbase-lite/3.2/c/c_fleece.html#immutable-2

       

      In code snippet:

       

      int count = FLArray_Count(myArray);
      if (count > 0) {
          FLValue value = FLArray_Get(0);
          doSomethingWith(value);
      } 

      The line: 

       

      FLValue value = FLArray_Get(0);  

      Should be:

      FLValue value = FLArray_Get(myArray, 0);      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            elliot.hunter Elliot Hunter
            gilad.kalchheim Gilad Kalchheim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty