Update examples

This commit is contained in:
Patrick Pelissier committed 2023-11-04 18:48:13 +01:00
1 parent f7f5db61d3
commit 703ab6ff9c
2 files changed
+5 -3

No files matched your search

+4 -2
View File
@@ -59,10 +59,12 @@ int main(void)
}
// Print
printf("\nElisabeth has id = %d\n", *map_employee_name_get(Employees_r, STRING_CTE("Elisabeth")));
printf("\nElisabeth has id = %d\n", *map_employee_name_get(Employees_r, STRING_CTE("Elisabeth")));
// Print using emplace (we give a const char [] isntead of a const string_t, avoiding macro STRING_CTE)
printf("\nElisabeth has id = %d\n", *map_employee_name_get_emplace(Employees_r, "Elisabeth"));
} /* Employees_r is cleared beyond this point */
// But employee is not
// But employee is not since we don't use M_LET
map_employee_id_clear(Employees);
return 0;
}
+1 -1
View File
@@ -10,7 +10,7 @@
*/
static const char empty_str[] = "EMPTY";
static const char deleted_str[] = "DELETED";
static const char *oor_table[] = { empty_str, deleted_str };
static const char *const oor_table[] = { empty_str, deleted_str };
static inline bool oor_equal_p(const char *k, int n)
{