MySQL 9.6.0
Source Code Documentation
lf_types.h
Go to the documentation of this file.
1/* Copyright (c) 2007, 2025, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef _lf_types_h
25#define _lf_types_h
26
27#include "my_inttypes.h"
28
29#define LF_HASH_UNIQUE 1
30#define MY_LF_ERRPTR ((void *)(intptr)1)
31
32/**
33 Callback for extracting key and key length from user data in a LF_HASH.
34
35 @param arg Pointer to user data.
36 @param[out] length Store key length here.
37 @return Pointer to key to be hashed.
38
39 @note Was my_hash_get_key, with lots of C-style casting when calling
40 my_hash_init. Renamed to force build error (since signature changed)
41 in case someone keeps following that coding style.
42 */
43typedef const uchar *(*hash_get_key_function)(const uchar *arg, size_t *length);
44
45/*
46 memory allocator, lf_alloc-pin.c
47*/
48typedef void lf_allocator_func(uchar *);
49
50typedef int lf_hash_match_func(const uchar *el, void *arg);
51
52typedef void lf_hash_init_func(uchar *dst, const uchar *src);
53
54#endif
void lf_hash_init_func(uchar *dst, const uchar *src)
Definition: lf_types.h:52
void lf_allocator_func(uchar *)
Definition: lf_types.h:48
int lf_hash_match_func(const uchar *el, void *arg)
Definition: lf_types.h:50
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76